import 'package:flutter_ncsjqz_getx/generated/json/base/json_convert_content.dart';
import 'package:flutter_ncsjqz_getx/model/square_a_d_entity.dart';

SquareADEntity $SquareADEntityFromJson(Map<String, dynamic> json) {
	final SquareADEntity squareADEntity = SquareADEntity();
	final String? msg = jsonConvert.convert<String>(json['msg']);
	if (msg != null) {
		squareADEntity.msg = msg;
	}
	final int? code = jsonConvert.convert<int>(json['code']);
	if (code != null) {
		squareADEntity.code = code;
	}
	final List<SquareADData>? data = jsonConvert.convertListNotNull<SquareADData>(json['data']);
	if (data != null) {
		squareADEntity.data = data;
	}
	return squareADEntity;
}

Map<String, dynamic> $SquareADEntityToJson(SquareADEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['msg'] = entity.msg;
	data['code'] = entity.code;
	data['data'] =  entity.data?.map((v) => v.toJson()).toList();
	return data;
}

SquareADData $SquareADDataFromJson(Map<String, dynamic> json) {
	final SquareADData squareADData = SquareADData();
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		squareADData.id = id;
	}
	final String? url = jsonConvert.convert<String>(json['url']);
	if (url != null) {
		squareADData.url = url;
	}
	final int? status = jsonConvert.convert<int>(json['status']);
	if (status != null) {
		squareADData.status = status;
	}
	final String? createTime = jsonConvert.convert<String>(json['createTime']);
	if (createTime != null) {
		squareADData.createTime = createTime;
	}
	final String? updateTime = jsonConvert.convert<String>(json['updateTime']);
	if (updateTime != null) {
		squareADData.updateTime = updateTime;
	}
	final int? linkType = jsonConvert.convert<int>(json['linkType']);
	if (linkType != null) {
		squareADData.linkType = linkType;
	}
	final String? link = jsonConvert.convert<String>(json['link']);
	if (link != null) {
		squareADData.link = link;
	}
	final String? title = jsonConvert.convert<String>(json['title']);
	if (title != null) {
		squareADData.title = title;
	}
	return squareADData;
}

Map<String, dynamic> $SquareADDataToJson(SquareADData entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['url'] = entity.url;
	data['status'] = entity.status;
	data['createTime'] = entity.createTime;
	data['updateTime'] = entity.updateTime;
	data['linkType'] = entity.linkType;
	data['link'] = entity.link;
	data['title'] = entity.title;
	return data;
}